package com 
{
	import flash.filters.ColorMatrixFilter;
	import flash.geom.Matrix;
	
	/**
	 * ...
	 * @author HoangBu
	 */
	public class GColorMatrixFilter 
	{
		public static const NONE:int = 0;
		public static const GRAYSCALE:int = 1;
		private var _type:int = 0;
		private var _m:Array;
		public function GColorMatrixFilter(type:int) 
		{
			_type = type;
			switch (_type) 
			{
				case NONE:
					_m = [];
					break;
				case GRAYSCALE :
					_m = [0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0, 0, 0, 1, 0];
					break;
				default:
					break;
			}
		}
		
		public function get filter():ColorMatrixFilter 
		{
			return new ColorMatrixFilter(_m);
		}
		
	}

}